|
|
|
|
|
|
|
Figure 18.5.
Use the Debug menu to access the debugging tools in Visual Basic. |
|
|
|
|
|
|
|
|
There are times when you will need to execute portions of your application code in order to find the cause of a problem. In most cases, you will also have to analyze what is happening to the data as well. You might find that the problem is in a variable or a property with an invalid value in it. What you must do is find out how and why the value was incorrect. With the different debugging windows, you can monitor the values of expressions and variables while stepping through the statements in your application. There are three different debugging windows that you will use during this process: |
|
|
|
|
|
|
|
|
Working in conjunction with the code window, you will use these three windows to fully test and debug your application. The Immediate window displays information from one of two possible areas. By using the Debug object (discussed later in this chapter), you can have any value or expression printed in this window during the execution of the application, or when in Break mode, you can use the Print command to display the contents of any variable, property, or calculation as shown in Figure 18.6. |
|
|
|
|
|